package lily.phs.object;

import lily.phs.database.Constants;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.util.Log;
public class PersonInfo implements Constants{
	private Context myContext;
//	private int pein_id=-1;
	private int pein_profile_id=-1;
	private int pein_sex=-1;
	private String pein_born="";
	private String pein_perid="";
	private String pein_work="";
	private String pein_phone="";
	private String pein_contact_name="";
	private String pein_contact_phone="";
	private int pein_permatent_type=-1;
	private int pein_nation=-1;
	private String pein_minority="";
	private int pein_blood_type=-1;
	private int pein_rh_negative=-1;
	private int pein_culture_stdd=-1;
	private int pein_occupation=-1;
	private int pein_marriage=-1;
	private String pein_hos_cost_type="";
	private String pein_hos_cost_type_ot="";
	private String pein_drug_allergy="";
	private String pein_drug_allergy_ot="";
	private String pein_exposure_his="";
	private String pein_disease="";
	private String pein_cancer="";
	private String pein_occ_dis="";
	private String pein_disease_ot="";
	private String pein_disease_date="";
	private int pein_surgery=-1;
	private String pein_surgery_name1="";
	private String pein_surgery_date1="";
	private String pein_surgery_name2="";
	private String pein_surgery_date2="";
	private int pein_trauma=-1;
	private String pein_trauma_name1="";
	private String pein_trauma_time1="";
	private String pein_trauma_name2="";
	private String pein_trauma_time2="";
	private int pein_transfusion=-1;
	private String pein_trfusion_reason1="";
	private String pein_trfusion_time1="";
	private String pein_trfusion_reason2="";
	private String pein_trfusion_time2="";
	private String pein_family_his_ft="";
	private String pein_family_his_ft_ot="";
	private String pein_family_his_mt="";
	private String pein_family_his_mt_ot="";
	private String pein_family_his_bs="";
	private String pein_family_his_bs_ot="";
	private String pein_family_his_sd="";
	private String pein_family_his_sd_ot="";
	
	private int pein_hereditary_his=-1;
	private String pein_hereditary_name="";
	private String pein_disable_situ="";
	private String pein_disable_situ_ot="";
	private int pein_live_kit=-1;
	private int pein_live_fuel=-1;
	private int pein_live_water=-1;
	private int pein_live_toilet=-1;
	private int pein_live_stock=-1;
	
	public PersonInfo(Context context){
		this.myContext=context;
	}
/*	public int getPein_id() {
		return pein_id;
	}
	public void setPein_id(int peinId) {
		pein_id = peinId;
	}*/
	public int getPein_profile_id() {
		return pein_profile_id;
	}
	public void setPein_profile_id(int peinProfileId) {
		pein_profile_id = peinProfileId;
	}
	public int getPein_sex() {
		return pein_sex;
	}
	public void setPein_sex(int peinSex) {
		pein_sex = peinSex;
	}
	public String getPein_born() {
		return pein_born;
	}
	public void setPein_born(String peinBorn) {
		pein_born = peinBorn;
	}
	public String getPein_perid() {
		return pein_perid;
	}
	public void setPein_perid(String peinPerid) {
		pein_perid = peinPerid;
	}
	public String getPein_work() {
		return pein_work;
	}
	public void setPein_work(String peinWork) {
		pein_work = peinWork;
	}
	public String getPein_phone() {
		return pein_phone;
	}
	public void setPein_phone(String peinPhone) {
		pein_phone = peinPhone;
	}
	public String getPein_contact_name() {
		return pein_contact_name;
	}
	public void setPein_contact_name(String peinContactName) {
		pein_contact_name = peinContactName;
	}
	public String getPein_contact_phone() {
		return pein_contact_phone;
	}
	public void setPein_contact_phone(String peinContactPhone) {
		pein_contact_phone = peinContactPhone;
	}
	public int getPein_permatent_type() {
		return pein_permatent_type;
	}
	public void setPein_permatent_type(int peinPermatentType) {
		pein_permatent_type = peinPermatentType;
	}
	public int getPein_nation() {
		return pein_nation;
	}
	public void setPein_nation(int peinNation) {
		pein_nation = peinNation;
	}
	public String getPein_minority() {
		return pein_minority;
	}
	public void setPein_minority(String peinMinority) {
		pein_minority = peinMinority;
	}
	public int getPein_blood_type() {
		return pein_blood_type;
	}
	public void setPein_blood_type(int peinBloodType) {
		pein_blood_type = peinBloodType;
	}
	public int getPein_rh_negative() {
		return pein_rh_negative;
	}
	public void setPein_rh_negative(int peinRhNegative) {
		pein_rh_negative = peinRhNegative;
	}
	public int getPein_culture_stdd() {
		return pein_culture_stdd;
	}
	public void setPein_culture_stdd(int peinCultureStdd) {
		pein_culture_stdd = peinCultureStdd;
	}
	public int getPein_occupation() {
		return pein_occupation;
	}
	public void setPein_occupation(int peinOccupation) {
		pein_occupation = peinOccupation;
	}
	public int getPein_marriage() {
		return pein_marriage;
	}
	public void setPein_marriage(int peinMarriage) {
		pein_marriage = peinMarriage;
	}
	public String getPein_hos_cost_type() {
		return pein_hos_cost_type;
	}
	public void setPein_hos_cost_type(String peinHosCostType) {
		pein_hos_cost_type = peinHosCostType;
	}
	public String getPein_hos_cost_type_ot() {
		return pein_hos_cost_type_ot;
	}
	public void setPein_hos_cost_type_ot(String peinHosCostTypeOt) {
		pein_hos_cost_type_ot = peinHosCostTypeOt;
	}
	public String getPein_drug_allergy() {
		return pein_drug_allergy;
	}
	public void setPein_drug_allergy(String peinDrugAllergy) {
		pein_drug_allergy = peinDrugAllergy;
	}
	public String getPein_drug_allergy_ot() {
		return pein_drug_allergy_ot;
	}
	public void setPein_drug_allergy_ot(String peinDrugAllergyOt) {
		pein_drug_allergy_ot = peinDrugAllergyOt;
	}
	public String getPein_exposure_his() {
		return pein_exposure_his;
	}
	public void setPein_exposure_his(String peinExposureHis) {
		pein_exposure_his = peinExposureHis;
	}
	public String getPein_disease() {
		return pein_disease;
	}
	public void setPein_disease(String peinDisease) {
		pein_disease = peinDisease;
	}
	public String getPein_cancer() {
		return pein_cancer;
	}
	public void setPein_cancer(String peinCancer) {
		pein_cancer = peinCancer;
	}
	public String getPein_occ_dis() {
		return pein_occ_dis;
	}
	public void setPein_occ_dis(String peinOccDis) {
		pein_occ_dis = peinOccDis;
	}
	public String getPein_disease_ot() {
		return pein_disease_ot;
	}
	public void setPein_disease_ot(String peinDiseaseOt) {
		pein_disease_ot = peinDiseaseOt;
	}
	public String getPein_disease_date() {
		return pein_disease_date;
	}
	public void setPein_disease_date(String peinDiseaseDate) {
		pein_disease_date = peinDiseaseDate;
	}
	public int getPein_surgery() {
		return pein_surgery;
	}
	public void setPein_surgery(int peinSurgery) {
		pein_surgery = peinSurgery;
	}
	public String getPein_surgery_name1() {
		return pein_surgery_name1;
	}
	public void setPein_surgery_name1(String peinSurgeryName1) {
		pein_surgery_name1 = peinSurgeryName1;
	}
	public String getPein_surgery_date1() {
		return pein_surgery_date1;
	}
	public void setPein_surgery_date1(String peinSurgeryDate1) {
		pein_surgery_date1 = peinSurgeryDate1;
	}
	public String getPein_surgery_name2() {
		return pein_surgery_name2;
	}
	public void setPein_surgery_name2(String peinSurgeryName2) {
		pein_surgery_name2 = peinSurgeryName2;
	}
	public String getPein_surgery_date2() {
		return pein_surgery_date2;
	}
	public void setPein_surgery_date2(String peinSurgeryDate2) {
		pein_surgery_date2 = peinSurgeryDate2;
	}
	public int getPein_trauma() {
		return pein_trauma;
	}
	public void setPein_trauma(int peinTrauma) {
		pein_trauma = peinTrauma;
	}
	public String getPein_trauma_name1() {
		return pein_trauma_name1;
	}
	public void setPein_trauma_name1(String peinTraumaName1) {
		pein_trauma_name1 = peinTraumaName1;
	}
	public String getPein_trauma_time1() {
		return pein_trauma_time1;
	}
	public void setPein_trauma_time1(String peinTraumaTime1) {
		pein_trauma_time1 = peinTraumaTime1;
	}
	public String getPein_trauma_name2() {
		return pein_trauma_name2;
	}
	public void setPein_trauma_name2(String peinTraumaName2) {
		pein_trauma_name2 = peinTraumaName2;
	}
	public String getPein_trauma_time2() {
		return pein_trauma_time2;
	}
	public void setPein_trauma_time2(String peinTraumaTime2) {
		pein_trauma_time2 = peinTraumaTime2;
	}
	public int getPein_transfusion() {
		return pein_transfusion;
	}
	public void setPein_transfusion(int peinTransfusion) {
		pein_transfusion = peinTransfusion;
	}
	public String getPein_trfusion_reason1() {
		return pein_trfusion_reason1;
	}
	public void setPein_trfusion_reason1(String peinTrfusionReason1) {
		pein_trfusion_reason1 = peinTrfusionReason1;
	}
	public String getPein_trfusion_time1() {
		return pein_trfusion_time1;
	}
	public void setPein_trfusion_time1(String peinTrfusionTime1) {
		pein_trfusion_time1 = peinTrfusionTime1;
	}
	public String getPein_trfusion_reason2() {
		return pein_trfusion_reason2;
	}
	public void setPein_trfusion_reason2(String peinTrfusionReason2) {
		pein_trfusion_reason2 = peinTrfusionReason2;
	}
	public String getPein_trfusion_time2() {
		return pein_trfusion_time2;
	}
	public void setPein_trfusion_time2(String peinTrfusionTime2) {
		pein_trfusion_time2 = peinTrfusionTime2;
	}
	public String getPein_family_his_ft() {
		return pein_family_his_ft;
	}
	public void setPein_family_his_ft(String peinFamilyHisFt) {
		pein_family_his_ft = peinFamilyHisFt;
	}
	public String getPein_family_his_ft_ot() {
		return pein_family_his_ft_ot;
	}
	public void setPein_family_his_ft_ot(String peinFamilyHisFtOt) {
		pein_family_his_ft_ot = peinFamilyHisFtOt;
	}
	public String getPein_family_his_mt() {
		return pein_family_his_mt;
	}
	public void setPein_family_his_mt(String peinFamilyHisMt) {
		pein_family_his_mt = peinFamilyHisMt;
	}
	public String getPein_family_his_mt_ot() {
		return pein_family_his_mt_ot;
	}
	public void setPein_family_his_mt_ot(String peinFamilyHisMtOt) {
		pein_family_his_mt_ot = peinFamilyHisMtOt;
	}
	public String getPein_family_his_bs() {
		return pein_family_his_bs;
	}
	public void setPein_family_his_bs(String peinFamilyHisBs) {
		pein_family_his_bs = peinFamilyHisBs;
	}
	public String getPein_family_his_bs_ot() {
		return pein_family_his_bs_ot;
	}
	public void setPein_family_his_bs_ot(String peinFamilyHisBsOt) {
		pein_family_his_bs_ot = peinFamilyHisBsOt;
	}
	public String getPein_family_his_sd() {
		return pein_family_his_sd;
	}
	public void setPein_family_his_sd(String peinFamilyHisSd) {
		pein_family_his_sd = peinFamilyHisSd;
	}
	public String getPein_family_his_sd_ot() {
		return pein_family_his_sd_ot;
	}
	public void setPein_family_his_sd_ot(String peinFamilyHisSdOt) {
		pein_family_his_sd_ot = peinFamilyHisSdOt;
	}
	public int getPein_hereditary_his() {
		return pein_hereditary_his;
	}
	public void setPein_hereditary_his(int peinHereditaryHis) {
		pein_hereditary_his = peinHereditaryHis;
	}
	public String getPein_hereditary_name() {
		return pein_hereditary_name;
	}
	public void setPein_hereditary_name(String peinHereditaryName) {
		pein_hereditary_name = peinHereditaryName;
	}
	public String getPein_disable_situ() {
		return pein_disable_situ;
	}
	public void setPein_disable_situ(String peinDisableSitu) {
		pein_disable_situ = peinDisableSitu;
	}
	public String getPein_disable_situ_ot() {
		return pein_disable_situ_ot;
	}
	public void setPein_disable_situ_ot(String peinDisableSituOt) {
		pein_disable_situ_ot = peinDisableSituOt;
	}
	public int getPein_live_kit() {
		return pein_live_kit;
	}
	public void setPein_live_kit(int peinLiveKit) {
		pein_live_kit = peinLiveKit;
	}
	public int getPein_live_fuel() {
		return pein_live_fuel;
	}
	public void setPein_live_fuel(int peinLiveFuel) {
		pein_live_fuel = peinLiveFuel;
	}
	public int getPein_live_water() {
		return pein_live_water;
	}
	public void setPein_live_water(int peinLiveWater) {
		pein_live_water = peinLiveWater;
	}
	public int getPein_live_toilet() {
		return pein_live_toilet;
	}
	public void setPein_live_toilet(int peinLiveToilet) {
		pein_live_toilet = peinLiveToilet;
	}
	public int getPein_live_stock() {
		return pein_live_stock;
	}
	public void setPein_live_stock(int peinLiveStock) {
		pein_live_stock = peinLiveStock;
	}
	public String getNation(){
		if(this.pein_nation==1){
			return "汉族";
		}
		else {
			return this.pein_minority;
		}
	}
	
	public void insertPersonInfo(){
		ContentValues value=new ContentValues();
	//	value.put(Constants.PEIN_ID,this.getPein_id());
		value.put(Constants.PEIN_PROFILE_ID,this.getPein_profile_id());
		value.put(Constants.PEIN_SEX,this.getPein_sex());
		value.put(Constants.PEIN_BORN, this.getPein_born());
		value.put(Constants.PEIN_PERID, this.getPein_perid());
		value.put(Constants.PEIN_WORK, this.getPein_work());
		value.put(Constants.PEIN_PHONE, this.getPein_phone());
		value.put(Constants.PEIN_CONTACT_NAME, this.getPein_contact_name());
		value.put(Constants.PEIN_CONTACT_PHONE, this.getPein_contact_phone());
		value.put(Constants.PEIN_PERMATENT_TYPE, this.getPein_permatent_type());
		value.put(Constants.PEIN_NATION, this.getPein_nation());
		value.put(Constants.PEIN_MINORITY, this.getPein_minority());
		value.put(Constants.PEIN_BLOOD_TYPE, this.getPein_blood_type());
		value.put(Constants.PEIN_RH_NEGATIVE, this.getPein_rh_negative());
		value.put(Constants.PEIN_CULTURE_STDD, this.getPein_culture_stdd());
		value.put(Constants.PEIN_OCCUPATION, this.getPein_occupation());
		value.put(Constants.PEIN_MARRIAGE, this.getPein_marriage());
		value.put(Constants.PEIN_HOS_COST_TYPE, this.getPein_hos_cost_type());
		value.put(Constants.PEIN_HOS_COST_TYPE_OT, this.getPein_hos_cost_type_ot());
		value.put(Constants.PEIN_DRUG_ALLERGY, this.getPein_drug_allergy());
		value.put(Constants.PEIN_DRUG_ALLERGY_OT, this.getPein_drug_allergy_ot());
		value.put(Constants.PEIN_EXPOSURE_HIS, this.getPein_exposure_his());
		value.put(Constants.PEIN_DISEASE, this.getPein_disease());
		value.put(Constants.PEIN_CANCER, this.getPein_cancer());
		value.put(Constants.PEIN_OCC_DIS, this.getPein_occ_dis());
		value.put(Constants.PEIN_DISEASE_OT, this.getPein_disease_ot());
		value.put(Constants.PEIN_DISEASE_DATE, this.getPein_disease_date());
		value.put(Constants.PEIN_SURGERY, this.getPein_surgery());
		value.put(Constants.PEIN_SURGERY_NAME1, this.getPein_surgery_name1());
		value.put(Constants.PEIN_SURGERY_DATE1, this.getPein_surgery_date1());
		value.put(Constants.PEIN_SURGERY_NAME2, this.getPein_surgery_name2());
		value.put(Constants.PEIN_SURGERY_DATE2, this.getPein_surgery_date2());
		value.put(Constants.PEIN_TRAUMA, this.getPein_trauma());
		value.put(Constants.PEIN_TRAUMA_NAME1, this.getPein_trauma_name1());
		value.put(Constants.PEIN_TRAUMA_TIME1, this.getPein_trauma_time1());
		value.put(Constants.PEIN_TRAUMA_NAME2, this.getPein_trauma_name2());
		value.put(Constants.PEIN_TRAUMA_TIME2, this.getPein_trauma_time2());
		value.put(Constants.PEIN_TRANSFUSION, this.getPein_transfusion());
		value.put(Constants.PEIN_TRFUSION_REASON1, this.getPein_trfusion_reason1());
		value.put(Constants.PEIN_TRFUSION_TIME1, this.getPein_trfusion_time1());
		value.put(Constants.PEIN_TRFUSION_REASON2, this.getPein_trfusion_reason2());
		value.put(Constants.PEIN_TRFUSION_TIME2, this.getPein_trfusion_time2());
		value.put(Constants.PEIN_FAMILY_HIS_FT, this.getPein_family_his_ft());
		value.put(Constants.PEIN_FAMILY_HIS_FT_OT, this.getPein_family_his_ft_ot());
		value.put(Constants.PEIN_FAMILY_HIS_MT, this.getPein_family_his_mt());
		value.put(Constants.PEIN_FAMILY_HIS_MT_OT, this.getPein_family_his_mt_ot());
		value.put(Constants.PEIN_FAMILY_HIS_BS, this.getPein_family_his_bs());
		value.put(Constants.PEIN_FAMILY_HIS_BS_OT, this.getPein_family_his_bs_ot());
		value.put(Constants.PEIN_FAMILY_HIS_SD, this.getPein_family_his_sd());
		value.put(Constants.PEIN_FAMILY_HIS_SD_OT, this.getPein_family_his_sd_ot());
		
		value.put(Constants.PEIN_HEREDITARY_HIS, this.getPein_hereditary_his());
		value.put(Constants.PEIN_HEREDITARY_NAME, this.getPein_hereditary_name());
		value.put(Constants.PEIN_DISABLE_SITU, this.getPein_disable_situ());
		value.put(Constants.PEIN_DISABLE_SITU_OT, this.getPein_disable_situ_ot());
		value.put(Constants.PEIN_LIVE_KIT, this.getPein_live_kit());
		value.put(Constants.PEIN_LIVE_FUEL, this.getPein_live_fuel());
		value.put(Constants.PEIN_LIVE_WATER, this.getPein_live_water());
		value.put(Constants.PEIN_LIVE_TOILET, this.getPein_live_toilet());
		value.put(Constants.PEIN_LIVE_STOCK, this.getPein_live_stock());	
		myContext.getContentResolver().insert(CONTENT_URI_TB3, value);
	}
	public void selectPersonInfo(int pro){
		Cursor cursor = myContext.getContentResolver().query(CONTENT_URI_TB3, null,
				PEIN_PROFILE_ID + "=" + pro + "", null, null);	
		while(cursor.moveToNext()){
		this.pein_profile_id=cursor.getInt(cursor.getColumnIndex(PEIN_PROFILE_ID));	
		this.pein_sex=cursor.getInt(cursor.getColumnIndex(PEIN_SEX));
		this.pein_born=cursor.getString(cursor.getColumnIndex(PEIN_BORN));
		this.pein_perid=cursor.getString(cursor.getColumnIndex(PEIN_PERID));
		this.pein_work=cursor.getString(cursor.getColumnIndex(PEIN_WORK));
		this.pein_phone=cursor.getString(cursor.getColumnIndex(PEIN_PHONE));
		this.pein_contact_name=cursor.getString(cursor.getColumnIndex(PEIN_CONTACT_NAME));
		this.pein_contact_phone=cursor.getString(cursor.getColumnIndex(PEIN_CONTACT_PHONE));
		this.pein_permatent_type=cursor.getInt(cursor.getColumnIndex(PEIN_PERMATENT_TYPE));
		this.pein_nation=cursor.getInt(cursor.getColumnIndex(PEIN_NATION));
		this.pein_minority=cursor.getString(cursor.getColumnIndex(PEIN_MINORITY));
		this.pein_blood_type=cursor.getInt(cursor.getColumnIndex(PEIN_BLOOD_TYPE));
		this.pein_rh_negative=cursor.getInt(cursor.getColumnIndex(PEIN_RH_NEGATIVE));
		this.pein_culture_stdd=cursor.getInt(cursor.getColumnIndex(PEIN_CULTURE_STDD));
		this.pein_occupation=cursor.getInt(cursor.getColumnIndex(PEIN_OCCUPATION));
		this.pein_marriage=cursor.getInt(cursor.getColumnIndex(PEIN_MARRIAGE));
		this.pein_hos_cost_type =cursor.getString(cursor.getColumnIndex(PEIN_HOS_COST_TYPE));
		this.pein_hos_cost_type_ot=cursor.getString(cursor.getColumnIndex(PEIN_HOS_COST_TYPE_OT));
		this.pein_drug_allergy=cursor.getString(cursor.getColumnIndex(PEIN_DRUG_ALLERGY));
		this.pein_drug_allergy_ot=cursor.getString(cursor.getColumnIndex(PEIN_DRUG_ALLERGY_OT));
		this.pein_exposure_his=cursor.getString(cursor.getColumnIndex(PEIN_EXPOSURE_HIS));
		this.pein_disease=cursor.getString(cursor.getColumnIndex(PEIN_DISEASE));
		this.pein_cancer=cursor.getString(cursor.getColumnIndex(PEIN_CANCER));
		this.pein_occ_dis=cursor.getString(cursor.getColumnIndex(PEIN_OCC_DIS));
		this.pein_disease_ot=cursor.getString(cursor.getColumnIndex(PEIN_DISEASE_OT));
		this.pein_disease_date=cursor.getString(cursor.getColumnIndex(PEIN_DISEASE_DATE));
		this.pein_surgery=cursor.getInt(cursor.getColumnIndex(PEIN_SURGERY));
		this.pein_surgery_name1=cursor.getString(cursor.getColumnIndex(PEIN_SURGERY_NAME1));
		this.pein_surgery_date1=cursor.getString(cursor.getColumnIndex(PEIN_SURGERY_DATE1));
		this.pein_surgery_name2=cursor.getString(cursor.getColumnIndex(PEIN_SURGERY_NAME2));
		this.pein_surgery_date2=cursor.getString(cursor.getColumnIndex(PEIN_SURGERY_DATE2));
		this.pein_trauma=cursor.getInt(cursor.getColumnIndex(PEIN_TRAUMA));
		this.pein_trauma_name1=cursor.getString(cursor.getColumnIndex(PEIN_TRAUMA_NAME1));
		this.pein_trauma_time1=cursor.getString(cursor.getColumnIndex(PEIN_TRAUMA_TIME1));
		this.pein_trauma_name2=cursor.getString(cursor.getColumnIndex(PEIN_TRAUMA_NAME2));
		this.pein_trauma_time2=cursor.getString(cursor.getColumnIndex(PEIN_TRAUMA_TIME2));
		this.pein_transfusion=cursor.getInt(cursor.getColumnIndex(PEIN_TRANSFUSION));
		this.pein_trfusion_reason1=cursor.getString(cursor.getColumnIndex(PEIN_TRFUSION_REASON1));
		this.pein_trfusion_time1=cursor.getString(cursor.getColumnIndex(PEIN_TRFUSION_TIME1));
		this.pein_trfusion_reason2=cursor.getString(cursor.getColumnIndex(PEIN_TRFUSION_REASON2));
		this.pein_trfusion_time2=cursor.getString(cursor.getColumnIndex(PEIN_TRFUSION_TIME2));
		this.pein_family_his_ft=cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_FT));
		this.pein_family_his_ft_ot=cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_FT_OT));
		this.pein_family_his_mt=cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_MT));
		this.pein_family_his_mt_ot=cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_MT_OT));
		this.pein_family_his_bs=cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_BS));
		this.pein_family_his_bs_ot=cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_BS_OT));
		this.pein_family_his_sd=cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_SD));
		this.pein_family_his_sd_ot=cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_SD_OT));
		
		this.pein_hereditary_his=cursor.getInt(cursor.getColumnIndex(PEIN_HEREDITARY_HIS));
		this.pein_hereditary_name=cursor.getString(cursor.getColumnIndex(PEIN_HEREDITARY_NAME));
		this.pein_disable_situ=cursor.getString(cursor.getColumnIndex(PEIN_DISABLE_SITU));
		this.pein_disable_situ_ot=cursor.getString(cursor.getColumnIndex(PEIN_DISABLE_SITU_OT));
		this.pein_live_kit=cursor.getInt(cursor.getColumnIndex(PEIN_LIVE_KIT));
		this.pein_live_fuel=cursor.getInt(cursor.getColumnIndex(PEIN_LIVE_FUEL));
		this.pein_live_water=cursor.getInt(cursor.getColumnIndex(PEIN_LIVE_WATER));
		this.pein_live_toilet=cursor.getInt(cursor.getColumnIndex(PEIN_LIVE_TOILET));
		this.pein_live_stock=cursor.getInt(cursor.getColumnIndex(PEIN_LIVE_STOCK));
		}	
		cursor.close();
	}
	public void updatePersonInfo(int pro){
		ContentValues value;
		value = new ContentValues();
		value.put(PEIN_PROFILE_ID,this.pein_profile_id);
		value.put(PEIN_SEX, this.pein_sex);
		value.put(PEIN_BORN, this.pein_born);
		value.put(PEIN_PERID, this.pein_perid);
		value.put(PEIN_WORK, this.pein_work);
		value.put(PEIN_PHONE,this.pein_phone);
		value.put(PEIN_CONTACT_NAME, this.pein_contact_name);
		value.put(PEIN_CONTACT_PHONE, this.pein_contact_phone);
		value.put(PEIN_PERMATENT_TYPE,this.pein_permatent_type);
		value.put(PEIN_NATION, this.pein_nation);
		value.put(PEIN_MINORITY, this.pein_minority);
		value.put(PEIN_BLOOD_TYPE, this.pein_blood_type);
		value.put(PEIN_RH_NEGATIVE, this.pein_rh_negative);
		value.put(PEIN_CULTURE_STDD, this.pein_culture_stdd);
		value.put(PEIN_OCCUPATION, this.pein_occupation);
		value.put(PEIN_MARRIAGE, this.pein_marriage);
		value.put(PEIN_HOS_COST_TYPE, this.pein_hos_cost_type);
		value.put(PEIN_HOS_COST_TYPE_OT, this.pein_hos_cost_type_ot);
		value.put(PEIN_DRUG_ALLERGY, this.pein_drug_allergy);
		value.put(PEIN_DRUG_ALLERGY_OT, this.pein_drug_allergy_ot);
		value.put(PEIN_EXPOSURE_HIS, this.pein_exposure_his);
		value.put(PEIN_DISEASE, this.pein_disease);
		value.put(PEIN_CANCER, this.pein_cancer);
		value.put(PEIN_OCC_DIS, this.pein_occ_dis);
		value.put(PEIN_DISEASE_OT, this.pein_disease_ot);
		value.put(PEIN_DISEASE_DATE, this.pein_disease_date);
		value.put(PEIN_SURGERY, this.pein_surgery);
		value.put(PEIN_SURGERY_NAME1, this.pein_surgery_name1);
		value.put(PEIN_SURGERY_DATE1, this.pein_surgery_date1);
		value.put(PEIN_SURGERY_NAME2, this.pein_surgery_name2);
		value.put(PEIN_SURGERY_DATE2, this.pein_surgery_date2);
		value.put(PEIN_TRAUMA, this.pein_trauma);
		value.put(PEIN_TRAUMA_NAME1, this.pein_trauma_name1);
		value.put(PEIN_TRAUMA_TIME1, this.pein_trauma_time1);
		value.put(PEIN_TRAUMA_NAME2, this.pein_trauma_name2);
		value.put(PEIN_TRAUMA_TIME2, this.pein_trauma_time2);
		value.put(PEIN_TRANSFUSION, this.pein_transfusion);
		value.put(PEIN_TRFUSION_REASON1, this.pein_trfusion_reason1);
		value.put(PEIN_TRFUSION_TIME1, this.pein_trfusion_time1);
		value.put(PEIN_TRFUSION_REASON2, this.pein_trfusion_reason2);
		value.put(PEIN_TRFUSION_TIME2, this.pein_trfusion_time2);
		value.put(PEIN_FAMILY_HIS_FT, this.pein_family_his_ft);
		value.put(PEIN_FAMILY_HIS_FT_OT, this.pein_family_his_ft_ot);
		value.put(PEIN_FAMILY_HIS_MT, this.pein_family_his_mt);
		value.put(PEIN_FAMILY_HIS_MT_OT, this.pein_family_his_mt_ot);
		value.put(PEIN_FAMILY_HIS_BS, this.pein_family_his_bs);
		value.put(PEIN_FAMILY_HIS_BS_OT, this.pein_family_his_bs_ot);
		value.put(PEIN_FAMILY_HIS_SD, this.pein_family_his_sd);
		value.put(PEIN_FAMILY_HIS_SD_OT, this.pein_family_his_sd_ot);
		value.put(PEIN_HEREDITARY_HIS, this.pein_hereditary_his);
		value.put(PEIN_HEREDITARY_NAME, this.pein_hereditary_name);
		value.put(PEIN_DISABLE_SITU, this.pein_disable_situ);
		value.put(PEIN_DISABLE_SITU_OT, this.pein_disable_situ_ot);
		value.put(PEIN_LIVE_KIT, this.pein_live_kit);
		value.put(PEIN_LIVE_FUEL, this.pein_live_fuel);
		value.put(PEIN_LIVE_WATER, this.pein_live_water);
		value.put(PEIN_LIVE_TOILET, this.pein_live_toilet);
		value.put(PEIN_LIVE_STOCK, this.pein_live_stock);
		myContext.getContentResolver().update(CONTENT_URI_TB3, value, 
				PEIN_PROFILE_ID +" = "+ pro + "", null);
		
	}
	public void deletePersonInfo(int pro){
		myContext.getContentResolver().delete(CONTENT_URI_TB3, PEIN_PROFILE_ID+"="+ pro + "", null);
	}
}
